#!/usr/bin/env python
# -*- coding:utf8 -*-
# uncompyle6 version 2.15.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Jul  1 2017, 13:36:56) 
# [GCC 4.4.6 20110731 (Red Hat 4.4.6-4)]
# Embedded file name: /data/bkce/open_paas/paas/templates_module/base_center.html.py
# Compiled at: 2018-01-02 11:22:53
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
STOP_RENDERING = runtime.STOP_RENDERING
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1514863373.669175
_enable_loop = True
_template_filename = u'/data/bkce/open_paas/paas/templates/base_center.html'
_template_uri = u'/base_center.html'
_source_encoding = 'utf-8'
_exports = [u'right_content_base', u'left_content', u'right_content']

def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]


def _mako_generate_namespaces(context):
    pass


def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base.html', _template_uri)


def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        APP_PATH = context.get('APP_PATH', UNDEFINED)

        def right_content_base():
            return render_right_content_base(context._locals(__M_locals))

        request = context.get('request', UNDEFINED)

        def right_content():
            return render_right_content(context._locals(__M_locals))

        def left_content():
            return render_left_content(context._locals(__M_locals))

        SITE_URL = context.get('SITE_URL', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'

<!-- 左侧导航 start -->
')
        if 'parent' not in context._data or not hasattr(context._data['parent'], 'left_content'):
            context['self'].left_content(**pageargs)
        __M_writer(u'
<!-- 左侧导航 end -->

<!-- 右侧内容 start -->
')
        if 'parent' not in context._data or not hasattr(context._data['parent'], 'right_content_base'):
            context['self'].right_content_base(**pageargs)
        __M_writer(u'
<!-- 右侧内容 end -->
')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_right_content_base(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def right_content_base():
            return render_right_content_base(context)

        def right_content():
            return render_right_content(context)

        __M_writer = context.writer()
        __M_writer(u'
    ')
        if 'parent' not in context._data or not hasattr(context._data['parent'], 'right_content'):
            context['self'].right_content(**pageargs)
        __M_writer(u'
')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_left_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        APP_PATH = context.get('APP_PATH', UNDEFINED)
        request = context.get('request', UNDEFINED)

        def left_content():
            return render_left_content(context)

        SITE_URL = context.get('SITE_URL', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'
    ')
        user_center = app_create = app_center = developer_tool = newbie_guide = services = servers = third_servers = faq = esb = saas_center = resource = ''
        relative_path = APP_PATH
        if relative_path.startswith(SITE_URL + 'accounts/profile/'):
            user_center = 'selected'
        else:
            if relative_path.startswith(SITE_URL + 'app/create/'):
                app_create = 'selected'
            else:
                if relative_path.startswith(SITE_URL + 'app/list/'):
                    app_center = 'selected'
                else:
                    if relative_path.startswith(SITE_URL + 'guide/tools/'):
                        developer_tool = 'selected'
                    else:
                        if relative_path.startswith(SITE_URL + 'engine/servers/'):
                            servers = 'selected'
                        else:
                            if relative_path.startswith(SITE_URL + 'engine/third_servers/'):
                                third_servers = 'selected'
                            else:
                                if relative_path.startswith(SITE_URL + 'esb/channel/list'):
                                    esb = 'selected'
                                else:
                                    if relative_path.startswith(SITE_URL + 'guide/services/'):
                                        services = 'selected'
                                    else:
                                        if relative_path.startswith(SITE_URL + 'guide/newbie/'):
                                            newbie_guide = 'selected'
                                        else:
                                            if relative_path.startswith(SITE_URL + 'saas/'):
                                                saas_center = 'selected'
                                            else:
                                                if relative_path.startswith(SITE_URL + 'resource/'):
                                                    resource = 'selected'
        __M_writer(u'
  <div class="menu_box" id="menuBar">
    <dl class="menu no_extra" style="border-top:none;">
      <dt class="menu_title clickable ')
        __M_writer(unicode(user_center))
        __M_writer(u'">
      <a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'accounts/profile/"><i class="icon_menu icon_menu manage"></i>个人信息</a>
      </dt>
    </dl>

    <dl class="menu">
      <dt class="menu_title">
      <i class="icon_menu appcenter"></i>应用中心<i class="arrow"></i>
      </dt>
      <dd class="menu_item none ')
        __M_writer(unicode(app_create))
        __M_writer(u'"><a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'app/create/">应用创建</a></dd>
      <dd class="menu_item none ')
        __M_writer(unicode(app_center))
        __M_writer(u'"><a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'app/list/">我的应用</a></dd>
      <!-- 超级管理员才有权限查看 -->
')
        if request.user.is_staff and request.user.is_superuser:
            __M_writer(u'        <dd class="menu_item none ')
            __M_writer(unicode(saas_center))
            __M_writer(u'"><a href="')
            __M_writer(unicode(SITE_URL))
            __M_writer(u'saas/list/">S-mart应用</a></dd>
')
        __M_writer(u'    </dl>
    <!-- 超级管理员才有权限查看 -->
')
        if request.user.is_staff and request.user.is_superuser:
            __M_writer(u'      <dl class="menu">
        <dt class="menu_title clickable ')
            __M_writer(unicode(servers))
            __M_writer(u'">
        <a href="')
            __M_writer(unicode(SITE_URL))
            __M_writer(u'engine/servers/"><i class="icon_menu task"></i>服务器信息</a>
        </dt>
      </dl>
      <dl class="menu">
        <dt class="menu_title clickable ')
            __M_writer(unicode(third_servers))
            __M_writer(u'">
        <a href="')
            __M_writer(unicode(SITE_URL))
            __M_writer(u'engine/third_servers/"><i class="icon_menu db"></i>第三方服务</a>
        </dt>
      </dl>
')
        __M_writer(u'    <dl class="menu">
      <dt class="menu_title clickable ')
        __M_writer(unicode(services))
        __M_writer(u'">
      <a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'guide/services/"><i class="icon_menu service"></i>服务介绍</a>
      </dt>
    </dl>

    <dl class="menu">
      <dt class="menu_title clickable ')
        __M_writer(unicode(newbie_guide))
        __M_writer(u'">
      <a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'guide/newbie/"><i class="icon_menu guide"></i>新手指南</a>
      </dt>
    </dl>

    <dl class="menu">
      <dt class="menu_title clickable ')
        __M_writer(unicode(resource))
        __M_writer(u'">
      <a href="')
        __M_writer(unicode(SITE_URL))
        __M_writer(u'resource/"> <i class="bk-icon icon-download f18 t_b mr10"></i>资源下载</a>
      </dt>
    </dl>

    <!-- 超级管理员才有权限查看, NOTE: 合并一行, 为了自动化生成开源版本方便 -->
')
        if request.user.is_staff and request.user.is_superuser:
            __M_writer(u'    <!-- esb manage -->
    <!-- 超级管理员才有权限查看, NOTE: 合并一行, 为了自动化生成开源版本方便 -->
    <dl class="menu"> <dt class="menu_title clickable ')
            __M_writer(unicode(esb))
            __M_writer(u'"> <a href="')
            __M_writer(unicode(SITE_URL))
            __M_writer(u'esb/manager/index/" target="_blank"><i class="icon_menu esb"></i>ESB管理</a> </dt> </dl>
')
        else:
            __M_writer(u'    <!-- 超级管理员才有权限查看, NOTE: 合并一行, 为了自动化生成开源版本方便 -->
    <dl class="menu"> <dt class="menu_title clickable ')
            __M_writer(unicode(esb))
            __M_writer(u'"> <a href="')
            __M_writer(unicode(SITE_URL))
            __M_writer(u'doc/index.html" target="_blank"><i class="icon_menu esb"></i>ESB文档</a> </dt> </dl>
')
        __M_writer(u'
    <dl class="menu">
        <dt class="menu_title clickable">
            <a href="http://magicbox.bk.tencent.com/" target="_blank"><i class="icon_menu sample"></i>MagicBox</a>
        </dt>
    </dl>

  </div>
')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_right_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def right_content():
            return render_right_content(context)

        __M_writer = context.writer()
        __M_writer(u'
    ')
        return ''
    finally:
        context.caller_stack._pop_frame()
